package com.yidu.hbats.service.TrainingPlan;

import com.yidu.hbats.dao.AtsEmpAthleteSchemeMapper;
import com.yidu.hbats.model.AtsEmpAthleteScheme;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class AtsEmpAthleteSchemeServiceimpl implements AtsEmpAthleteSchemeService{
    @Resource
    AtsEmpAthleteSchemeMapper atsEmpAthleteSchemeMapper;
    @Override
    public int insertSelective(AtsEmpAthleteScheme record) {
        record.setIsva(1);

        Date utilDate = new Date();//util.Date
        java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime());
        record.setCreatTime(sqlDate);
        return atsEmpAthleteSchemeMapper.insertSelective(record);
    }

    @Override
    public List<AtsEmpAthleteScheme> findByPid(int pid) {
        return atsEmpAthleteSchemeMapper.findByPid(pid);
    }

    @Override
    public int updatePid(AtsEmpAthleteScheme atsEmpAthleteScheme) {
        return atsEmpAthleteSchemeMapper.updatePid(atsEmpAthleteScheme);
    }

    @Override
    public int updatePidTwo(AtsEmpAthleteScheme atsEmpAthleteScheme) {
        return atsEmpAthleteSchemeMapper.updatePidTwo(atsEmpAthleteScheme);
    }

    @Override
    public int updatePidThree(AtsEmpAthleteScheme atsEmpAthleteScheme) {
        return atsEmpAthleteSchemeMapper.updatePidThree(atsEmpAthleteScheme);
    }

    @Override
    public int updatePidFour(AtsEmpAthleteScheme atsEmpAthleteScheme) {
        return atsEmpAthleteSchemeMapper.updatePidFour(atsEmpAthleteScheme);
    }

    @Override
    public int updatePidFive(AtsEmpAthleteScheme atsEmpAthleteScheme) {
        return atsEmpAthleteSchemeMapper.updatePidFive(atsEmpAthleteScheme);
    }

    @Override
    public List<AtsEmpAthleteScheme> findByPidThree(int pid) {
        return atsEmpAthleteSchemeMapper.findByPidThree(pid);
    }

    @Override
    public List<AtsEmpAthleteScheme> findByPidFour(int pid) {
        return atsEmpAthleteSchemeMapper.findByPidFour(pid);
    }

    @Override
    public List<AtsEmpAthleteScheme> findByPidFive(int pid) {
        return atsEmpAthleteSchemeMapper.findByPidFive(pid);
    }

    @Override
    public List<AtsEmpAthleteScheme> findByPidTwo(int pid) {
        return atsEmpAthleteSchemeMapper.findByPidTwo(pid);
    }
}